package ua.yandex.skipasssystem.skipass;

import ua.yandex.skipasssystem.skipass.enums.NumberOfLifts;
import ua.yandex.skipasssystem.skipass.validators.NumberOfLiftsSkiPassValidator;
import ua.yandex.skipasssystem.skipass.validators.Validator;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.EnumMap;

public class NumberOfLiftsSkiPass extends WithDaysOfWorkSkiPass
        implements NumberOfLiftsInterface {
    private int numberOfLifts;

    NumberOfLiftsSkiPass(long id,
                         LocalDate fromDate,
                         LocalDate toDate,
                         NumberOfLifts lifts,
                         EnumMap<DayOfWeek, Boolean> daysOfWork) {
        super(id, fromDate, toDate, daysOfWork);
        this.numberOfLifts = lifts.getValue();
    }

    public int getNumberOfLifts() {
        return numberOfLifts;
    }

    @Override
    public Validator getValidator() {
        return NumberOfLiftsSkiPassValidator.getValidator();
    }
}
